#include "comm.hpp"



int main(){
    // //1.创建key
    // key_t key = getKey();
    // cout << "client key=" << toHex(key) << endl;

    // //2.获取共享内存
    // int shmid = getShm(key, gsize);
    // cout << "client shmid=" << toHex(shmid) << endl;

    // //3.关联共享内存
    // char *start = attachShm(shmid);

    // //4.取消关联
    // detachShm(start);

    Shm shm1(CLIENT);
    char *start = shm1.getStart();

    char c = 'A';

    while(c <= 'K'){
        start[c - 'A'] = c;
        c++;
        start[c - 'A'] = '\0';
        sleep(1);
    }
    

    return 0;
}